package com.ybf.api.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.sql.Timestamp;

@Data
public class User {
    private Integer Id;
    @NotBlank(message = "用户名不能为空")
    private String username;
    private String nickname = "无名";
    @NotBlank(message = "密码不能为空")
    private String password;
    private String status = "1";
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //    @JsonFormat(shape = JsonFormat.Shape.NUMBER) // 返回时间搓格式
    private Timestamp createdAt;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    //    @JsonFormat(shape = JsonFormat.Shape.NUMBER) // 返回时间搓格式
    private Timestamp updatedAt;

    private String phone;
    private String img;
    private String sex = "3";
    private String intro;
    private String token;
    private long tokenTimeout;
}
